﻿using Orchard.Tasks;

namespace Wolf.LoggedInUsers.Services
{
    public class CheckUsersBackgroundTasks : IBackgroundTask
    {
        private readonly ILoggedInUsersService _loggedInUsersService;

        public CheckUsersBackgroundTasks(ILoggedInUsersService loggedInUsersService)
        {
            _loggedInUsersService = loggedInUsersService;
        }

        public void Sweep()
        {
            _loggedInUsersService.LogOutInactiveUsers();
        }
    }
}